package com.coisini.mapper;

import com.coisini.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    /**
     * 新增口味
     * @param flavors
     */
    void insert(List<DishFlavor> flavors);

    /**
     * 根据菜品的id批量删除口味
     * @param dishIds
     */
    void delete(List<Long> dishIds);

    /**
     * 根据菜品的id查询
     * @param dishId
     */
    @Select("select *  from dish_flavor where dish_id =#{dishId}")
    List<DishFlavor> getById(Long dishId);

    /**
     * 根据菜品id更新口味
     *
     * @param dishDTO
     * @param dishId
     * @param name
     * @param value
     *//*
    void update(Long dishId, String name, String value);*/
}
